<template>
  <div>
    <button :size="size" @click="subMit()">
      <slot></slot>
    </button>
  </div>
</template>

<script>
export default {
  props:{
    size:String
  },
  methods:{
    subMit(){
      this.#emit("submit")
    }
  }
}
</script>

<style>
  [size='medium']{
    width: 300px;
  }
  [size='small']{
    width: 150px;
  }
  [size='mini']{
    width: 100px;
  }
</style>

<end-button size="medium">
  阿牛
</end-button>